<!DOCTYPE html>
<html>
<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>�ϴ���Ƭ</title>
		 <script src="../js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
    	<script src="../js/exif.js" type="text/javascript" charset="utf-8"></script>
    	<script src="../js/canvasResize.js" type="text/javascript" charset="utf-8"></script>
	      

	</head>
	<body>
	 
<div>
    <a onclick = "mastBuy()">��ť</a>
	
</div>
</body>
<script>
    function hehe()
    {
         var a=new Object();
         a.MName="ss";
        $.ajax
         ({
                  type:"post",
				  traditional :true, 
                  url:"http://localhost:57475/Material/MaterialAdd", 
                  data:a,
				  dataType: 'text'

         });

    }
    function mastBuy() {
		var sv="";
		var buyAmount=1;
		$.ajax({
			type:"post",
			url:"http://www.roadhome.cn/core/control/wcm_eshop_order_cart/control.jsp",
			data:{method:"mastBuy",goodsid:10612,productspec:sv,amount:1},
			success:function(result){
				result=$.trim(result);
//				if(result=='ok'){
					window.location.href="http://www.roadhome.cn/member/order/order_confirm.jsp";
//				}else if(result=='nologin'){
//					$.box.confirm("您没有登录，请登录后再进行购买，谢谢！",function(){
//						window.location.href=loginurl;
//					},null,{
//						title:'备件购买管理'
//					});

//				}else if(result.indexOf('notEnough')!=-1){
//					var store = result.substring(result.indexOf('_')+1);
//					$.box.alert("库存数量不足,剩余库存数量:"+store,function(){
//					},{
//						title : '备件购买管理'
//					});
//					
//				}else{
//					$.box.alert("系统错误，请稍后重试！",function(){
//					},{
//						title : '备件购买管理'
//					});
//				}
			}
		});
	}

//app.use(function (req, res, next) {
//res.header("Access-Control-Allow-Origin", "*");
//res.header("Access-Control-Allow-Headers", "X-Requested-With");
//next();
//});
</script>